import request from '@/utils/request'

const baseApi = '/xmtsc-api'

// 简历管理-列表
export function list(data) {
    return request({
        url: baseApi + '/api/companyResume/getAllCompanyResume',
        method: 'post',
        data: data
    })
}

//面试邀请-列表
export function getAllCompanyInvited(data) {
    return request({
        url: baseApi + '/api/companyResume/getAllCompanyInvited',
        method: 'post',
        data: data
    })
}

//面试邀请-修改状态
export function editCompanyResume(id, feedback) {
    return request({
        url: baseApi + '/api/companyResume/editCompanyResume',
        method: 'post',
        data: { id: id, feedback: feedback }
    })
}
//面试邀请-修改简历为已查看
export function editCompanyResumeProcessState(id) {
    return request({
        url: baseApi + '/api/companyResume/editCompanyResumeProcessState/' + id,
        method: 'post',
        data: { id: id, processState: 1}
    })
}

//已下载的简历
export function downloadResumeList(data) {
    return request({
        // url: baseApi + '/api/downloadresume/page',
        url: baseApi + '/api/companyResume/findResumeDownloadList',
        method: 'post',
        // params: data
        data: data
    })
}
//删除简历
export function deleteCompanyResumeById(id) {
    return request({
        url: baseApi + '/api/companyResume/deleteCompanyResumeById',
        method: 'post',
        data: {id: id}
    })
}
//删除收藏的简历
export function deleteResumeCollectionById(id) {
    return request({
        url: baseApi + '/api/companyResume/deleteResumeCollectionById',
        method: 'post',
        data: {id: id}
    })
}
//批量删除简历
export function deleteBatchResumeCollection(data) {
    return request({
        url: baseApi + '/api/companyResume/deleteBatchResumeCollection',
        method: 'post',
        data: data
    })
}

//查询已收藏简历列表
export function collectResumeList(data) {
    return request({
        url: baseApi + '/api/companyResume/findResumeCollectionList',
        method: 'post',
        // params: data
        data: data
    })
}
//查询谁看过我列表
export function companyBrowseList(data) {
    return request({
        url: baseApi + '/api/companyResume/findCompanyBrowserList',
        method: 'post',
        data: data
    })
}
//企业批量下载简历
export function addBatchResumeDownload(data) {
    return request({
        url: baseApi + '/api/companyResume/addBatchResumeDownload',
        method: 'post',
        data: data
    })
}
